//
//  WYMomentFooterView.m
//  FriendCircleDemo
//
//  Created by mac on 2018/9/27.
//  Copyright © 2018年 WY. All rights reserved.
//

#import "WYMomentFooterView.h"

@interface WYMomentFooterView ()
/// 分割线
@property (nonatomic, strong)UIView *divider;

@end

@implementation WYMomentFooterView

+ (instancetype)footerViewWithTableView:(UITableView *)tableView{
    static NSString *ID = @"MomentFooter";
    WYMomentFooterView *footer = [tableView dequeueReusableHeaderFooterViewWithIdentifier:ID];
    if (footer == nil) {
        // 缓存池中没有, 自己创建
        footer = [[self alloc] initWithReuseIdentifier:ID];
    }
    return footer;
}

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithReuseIdentifier:reuseIdentifier])
    {
        self.contentView.backgroundColor = [UIColor clearColor];
    }
    return self;
}

-(void)setupUI
{
    UIView *divider = [UIView new];
    divider.backgroundColor = LineColor;
    [self.contentView addSubview:divider];
    self.divider = divider;
    
    [self.divider mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.equalTo(self.contentView);
        make.height.mas_equalTo(0.5);
    }];
}
@end
